/// stateChange : [{"Action":"Disconnect","To_Account":"10000008","Reason":"LinkClose","createTime":1629955489,"modifyTime":1629955489,"stateId":"612707de9f8cbc2089819711"}]
/// count : 1
/// userId : "10000010"

class ContactSortingModel {
  List<StateChange> stateChange;
  int count;
  String userId;

  ContactSortingModel({
      this.stateChange, 
      this.count, 
      this.userId});

  ContactSortingModel.fromJson(dynamic json) {
    if (json['stateChange'] != null) {
      stateChange = [];
      json['stateChange'].forEach((v) {
        stateChange.add(StateChange.fromJson(v));
      });
    }
    count = json['count'];
    userId = json['userId'];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    if (stateChange != null) {
      map['stateChange'] = stateChange.map((v) => v.toJson()).toList();
    }
    map['count'] = count;
    map['userId'] = userId;
    return map;
  }

}

/// Action : "Disconnect"
/// To_Account : "10000008"
/// Reason : "LinkClose"
/// createTime : 1629955489
/// modifyTime : 1629955489
/// stateId : "612707de9f8cbc2089819711"

class StateChange {
  String action;
  String toAccount;
  String reason;
  int createTime;
  int modifyTime;
  String stateId;

  StateChange({
      this.action, 
      this.toAccount, 
      this.reason, 
      this.createTime, 
      this.modifyTime, 
      this.stateId});

  StateChange.fromJson(dynamic json) {
    action = json['Action'];
    toAccount = json['To_Account'];
    reason = json['Reason'];
    createTime = json['createTime'];
    modifyTime = json['modifyTime'];
    stateId = json['stateId'];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map['Action'] = action;
    map['To_Account'] = toAccount;
    map['Reason'] = reason;
    map['createTime'] = createTime;
    map['modifyTime'] = modifyTime;
    map['stateId'] = stateId;
    return map;
  }

}